'------------------------------------
'
'           B L I T   D E M O
'
' A demonstration of the BLIT command
'
'         by Nickolas Marentes
'
'------------------------------------

LoadBMP "screen.bmp"
Color 4
y=159


LOOPSTART:
Timer=0

' SCROLLING PLOT WINDOW

Pixel(453,y)=2
r=Rnd
If r>.75 And y<218 Then y=y+4:GoTo SCROLL
If r<.25 And y>100 Then y=y-4:GoTo SCROLL
If y<159 Then y=y+1:GoTo SCROLL
If y>159 Then y=y-1

SCROLL:
Line -(453,y),2
BLIT 29,95,28,95,426,130,G


' SCROLLING TEXT WINDOW

If t=0 Then GoTo TXA
t=t-1
If t<8 Then GoTo CLRMIX
BLIT 27,257,27,255,182,156
GoTo CLRMIX

TXA:
Color Rnd*7
Print@(35,400)"A scrolling text window"
t=15


' RGB COLOR MIXING

CLRMIX:
If c>110 Then GoTo CLA
BLIT 266,305,267,305,158,44,R
BLIT 267,305,266,305,158,44,B
GoTo CLB

CLA:
BLIT 266,305,267,305,158,44,B
BLIT 267,305,266,305,158,44,R

CLB:
c=c+1
If c>221 Then c=0


Do While Timer<40:Loop
GoTo LOOPSTART
